<template>
  <div class="goods">
    <div class="goods-img">
      <img :src="data.goodsIcon" alt="" />
    </div>
    <div class="goods-info">
      <div class="goods-info-name">{{ data.skuName }}</div>
      <div class="goods-info-tags">
        <!-- <div class="goods-info-tag">仅收购浦发，招商</div> -->
      </div>
      <div class="goods-info-price">￥{{ price }}</div>
      <div class="goods-info-num">可收{{ data.acquireNumber }}件</div>
      <Button
        class="goods-info-btn"
        round
        size="mini"
        color="linear-gradient(138deg, #40424E 0%, #1E1F26 100%)"
        @click="toSell"
        :disabled="data.acquireNumber <= 0"
        >出售</Button
      >
    </div>
  </div>
  <!-- <Search v-model="value" shape="round" placeholder="请输入搜索关键词" /> -->
</template>

<script>
import { Button } from 'vant'
import util from '@/util/util'

export default {
  name: 'goods',
  components: {
    Button
  },
  props: ['data', 'goodsType', 'brand'],
  data () {
    return {
    }
  },
  computed: {
    price () {
      return util.formatMoney(this.data.realPrice)
    }
  },
  mounted () {

  },
  methods: {
    toSell () {
      this.$router.push(`/sellGoods/?id=${this.data.id}&acquireNumber=${this.data.acquireNumber}`)
    }
  }
}
</script>
<style lang="scss" scoped src="./styles/goods.scss"></style>
